fix: resolve option parsing conflict in issue subcommands#14
Merged
Conversation
The parent command's options were conflicting with subcommand options, causing --assignee and other filter options to not be parsed correctly when using subcommands like 'jira issue list --assignee=currentUser'. Changes: - Removed legacy parent command options and action - All functionality now uses explicit subcommands - Updated tests to verify subcommand structure and options - All 91 tests passing
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where filter options (--assignee, --project, --status) were not being parsed correctly in the jira issue list subcommand due to Commander.js parent/subcommand option conflicts. The fix removes legacy parent command options and action handlers, ensuring all functionality uses explicit subcommands.
Key Changes:
- Removed parent command options and action handler that conflicted with subcommand options
- Deleted unused
getIssueAction()helper function - Updated tests to verify subcommand structure instead of parent command options
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
## [2.1.2](v2.1.1...v2.1.2) (2025-12-10) ### Bug Fixes * resolve option parsing conflict in issue subcommands ([#14](#14)) ([efe6be8](efe6be8))
|
🎉 This PR is included in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
Fixed a critical bug where filter options like
--assignee,--project,--statuswere not being parsed correctly when usingjira issue listsubcommand. This was a follow-up fix to PR #13 - thebuildJQLfix alone wasn't enough because the options weren't reaching the function due to Commander.js parent/subcommand option conflicts.🎯 Type of Change
🔍 Changes Made
bin/commands/issue.jsgetIssueAction()helper functiontests/commands/issue.test.jsto verify subcommand structurelist,create,view,edit,delete)🧪 Testing
📊 Test Results
🚀 Deployment Notes
📝 Checklist
🔗 Related Issues
💬 Additional Notes
Root Cause:
Commander.js v11 has strict separation between parent command and subcommand options. When both parent and subcommand define the same options, the subcommand's options are ignored.
Before (Broken):
jira issue list --assignee=currentUser # Options object: { "limit": "20" } ❌ assignee missingAfter (Fixed):
This fix completes the work started in #13 by ensuring options are properly parsed and passed to the
buildJQLfunction.